package com.eastfair.pay.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.eastfair.annotation.annotation.dictionary.Dict;
import com.eastfair.annotation.annotation.vo.VoInfo;
import com.eastfair.annotation.model.BaseVoGroupClass;
import com.eastfair.pay.demand.InvoiceApplyGroup;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 实体类
 * 发票申请
 * </p>
 *
 * @author clm
 * @since 2022-06-08
 */
@Data
@ApiModel(value = "InvoiceApplyDTO", description = "发票申请")
public class InvoiceApplyVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 发票申请ID
     */
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @ApiModelProperty(value = "发票申请ID")
    private Long id;

    /**
     * 合同,结算单 枚举
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @ApiModelProperty(value = "合同,结算单 枚举")
    @Size(max = 64, message = "合同,结算单 枚举长度不能超过64")
    private String businessType;

    /**
     * 客户名称
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryById.class,InvoiceApplyGroup.invoiceApplyCnfirmQueryById.class})
    @ApiModelProperty(value = "客户名称")
    @Size(max = 255, message = "客户名称长度不能超过255")
    private String cutomerName;
    /**
     * 发票抬头
     */
    @VoInfo(groups = {InvoiceApplyGroup.all.class,})
    @ApiModelProperty(value = "发票抬头")
    @Size(max = 255, message = "发票抬头长度不能超过255")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String invoiceTitle;
    /**
     * 税号
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "税号")
    @Size(max = 255, message = "税号长度不能超过255")
    private String invoiceDutyParagraph;
    /**
     * 费用类型（数据字典）
     */
    @Dict(dicCode = "EXPENSE_TYPE")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "费用类型（数据字典）")
    @Size(max = 255, message = "费用类型（数据字典）长度不能超过255")
    private String costType;
    /**
     * 开票单位地址
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "开票单位地址")
    @Size(max = 255, message = "开票单位地址长度不能超过255")
    private String companyAddress;
    /**
     * 开票单位电话
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "开票单位电话")
    @Size(max = 255, message = "开票单位电话长度不能超过255")
    private String companyTel;

    /**
     * 经手人名称
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {BaseVoGroupClass.all.class})
    @ApiModelProperty(value = "经手人名称")
    @Size(max = 255, message = "经手人名称长度不能超过255")
    private String applicantName;

    /**
     * 展会名称
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryPage.class})
    @ApiModelProperty(value = "展会名称")
    @Size(max = 255, message = "展会名称长度不能超过255")
    private String exhibitionName;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long exhibitionId;

    /**
     * 申请日期
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryPage.class})
    @ApiModelProperty(value = "申请日期")
    private LocalDateTime applicationTime;
    /**
     * 对方账号
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "对方账号")
    @Size(max = 255, message = "对方账号长度不能超过255")
    private String bankAccountNum;
    /**
     * 对方开户行
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "对方开户行")
    @Size(max = 255, message = "对方开户行长度不能超过255")
    private String bankName;
    /**
     * 成功开票数量
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @ApiModelProperty(value = "成功开票数量")
    private Integer successNum;

    /**
     * 可开票金额
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "开票金额")
    private BigDecimal invoiceAmount;

    /**
     * 申请人姓名
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "申请人姓名")
    @Size(max = 255, message = "申请人姓名长度不能超过255")
    private String applicationName;

    /**
     * 开票详情
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryById.class})
    @ApiModelProperty(value = "开票详情集合")
    private List<InvoiceVO> invoiceVOList;

    /**
     * 收件人
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryById.class,InvoiceApplyGroup.invoiceApplyCnfirmQueryById.class})
    @ApiModelProperty(value = "收件人")
    @Size(max = 255, message = "收件人长度不能超过255")
    private String addressee;
    /**
     * 收件人地址
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryById.class,InvoiceApplyGroup.invoiceApplyCnfirmQueryById.class})
    @ApiModelProperty(value = "收件人地址")
    @Size(max = 255, message = "收件人地址长度不能超过255")
    private String toAddress;
    /**
     * 收件人手机号
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryById.class,InvoiceApplyGroup.invoiceApplyCnfirmQueryById.class})
    @ApiModelProperty(value = "收件人手机号")
    @Size(max = 255, message = "收件人手机号长度不能超过255")
    private String mobile;
    /**
     * 收件人邮箱
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.invoiceApplyVOQueryById.class,InvoiceApplyGroup.invoiceApplyCnfirmQueryById.class})
    @ApiModelProperty(value = "收件人邮箱")
    @Size(max = 255, message = "收件人邮箱长度不能超过255")
    private String mailbox;

    /**
     * 申请开票时间
     */
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "发票类型（数据字典)")
    private LocalDateTime createTime;


    /**
     * 发票类型（数据字典)
     */
    @Dict(dicCode = "INVOICE_TYPE")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @ApiModelProperty(value = "发票类型（数据字典)")
    @Excel(name = "发票类型（数据字典)")
    private String invoiceType;

    /**
     * 开票状态
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    @Dict(dicCode = "INVOICE_STATE")
    @ApiModelProperty(value = "开票状态 数据字典")
    private String invoiceState;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @VoInfo(groups = {InvoiceApplyGroup.all.class})
    private String remark;

}
